Home |
| Latest | About | Random
# Godly magic squares. A classical magic square of order $n$ is an $n\times n$ table of numbers, using $1,2,3,\ldots,n^2$ such that every row, every column, and both diagonals have the same sum (called the magic number of this square). A story goes that in medieval times odd order magic squares where the center square is a 1 is special, perhaps even **godly**. So let us call those magic squares whose center square is 1 a **godly magic square**. Here is an example of a $7\times 7$ godly magic square: $$ \begin{bmatrix}18 & 27 & 29 & 38 & 47 & 7 & 9 \\ 36 & 45 & 5 & 14 & 16 & 25 & 34 \\ 12 & 21 & 23 & 32 & 41 & 43 & 3 \\ 30 & 39 & 48 & \color{blue}1 & 10 & 19 & 28 \\ 6 & 8 & 17 & 26 & 35 & 37 & 46\\ 24 &33 & 42 & 44 & 4 & 13 & 15 \\ 49 & 2 & 11 & 20 & 22 & 31 & 40\end{bmatrix} $$ And an example of an $11\times 11$ godly magic square: $$ \begin{bmatrix}32& 4& 108& 80& 63& 35& 18& 111& 94& 77& 49\\ 89& 72& 55& 27& 10& 103& 86& 58& 41& 13& 117\\ 36& 19& 112& 95& 67& 50& 33& 5& 109& 81& 64\\ 104& 87& 59& 42& 14& 118& 90& 73& 45& 28& 11\\ 51& 23& 6& 110& 82& 65& 37& 20& 113& 96& 68\\ 119& 91& 74& 46& 29& \color{blue}1& 105& 88& 60& 43& 15\\ 66& 38& 21& 114& 97& 69& 52& 24& 7& 100& 83\\ 2& 106& 78& 61& 44& 16& 120& 92& 75& 47& 30\\ 70& 53& 25& 8& 101& 84& 56& 39& 22& 115& 98\\ 17& 121& 93& 76& 48& 31& 3& 107& 79& 62& 34\\ 85& 57& 40& 12& 116& 99& 71& 54& 26& 9& 102\\\end{bmatrix} $$ One can show that there is no $3\times 3$ godly magic square. (Try it!) Try to find a $5\times 5$ godly magic square, these exist. **Question:** Is there a $9\times 9$ godly magic square? Or any $3k \times 3k$ godly magic square, when $3k$ is odd? --- A way to generate these odd order $n\times n$ magic square is using the **uniform step method**, which goes as follows. First, for simplicity of the index sake, we will start from $0$, we can always shift our square by a constant and it will remain magic. Now, pick three vectors: A starting vector $(a,b)$, a step vector $(p,q)$, and a breakaway vector $(r,s)$. Then: (1) Place a 0 at $(a,b)$. (2) Move by the vector $(p,q)$, and place the next number, do it until you placed down $n$ numbers total this way. (3) Now you will get back to $0$ and get stuck, so in addition, you move by the breakaway vector $(r,s)$, and start the next chain of $n$ numbers. In summary, here is where the number $k$ will be placed $$ k \mapsto (a+kp+\lfloor k/n\rfloor,b+kq) \mod n $$ If the numbers $a,b,p,q,r,s$ are choosen appropriately, then you would fill the square. But it may not be magic. So under certain conditions this actually yields a magic square. . --- As it turns out, a $9\times 9$ godly magic square exists ! The idea is that a $9\times 9$ **pan-diagonal magic square** exists -- a magic square where every off diagonal that wraps around also add to the magic sum, not just the two usual diagonals. Here is an example of a pandiagonal $4\times 4$ magic square: ![[Excalidraw/Godly magic squares 2023-05-09 08.48.36.excalidraw.svg]] where every row, column, diagonal, and wrap around diagonal all add up to 34. These pan-diagonal magic square has the property that if you rotate the columns, or rotate the rows, it remain magic. Doing so typically preserve the row and column sums, but the diagonals could be changed. However, if the magic square is pan-diagonal, then the two usual diagonals will still have the same sum! This means we can place the number $1$ anywhere we like on the square if we know there is a pan-diagonal magic square. #puzzle #i-dont-know-the-answer